
public class TestEnum {

	public enum test {
		RED("红色",1),GREEN("绿色",2),BLUE("蓝色",3);
		private String color;
		@SuppressWarnings("unused")
		private int index;
		
		private test(String color,int index){
			this.color = color;
			this.index = index;
		}
		
		@Override
		public String toString() {
			return this.color;
		}
		
	}
	
	public static void main(String[] args) {
		System.out.println(test.BLUE.color);
		test[] aa = test.values();
		System.out.println(aa[0] instanceof test);
		test red = test.valueOf(test.class, "RED");
		System.out.println(red.color);
	}
}
